<?php
class Images_Model_Imageslist extends Zen_List
{
    public function __construct ()
    {
        $this->table = new Zend_Db_Table('image');
    }
    
    public function afterUpdate($id, $params){
    	$cache = Zen_Cache_Factory::get('images');
		$cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG,array($id));
		/*
		$cache_dir = Zend_Registry::get ( 'cnf' )->cache_dir;
		$cache_dir .= "images/";
		$images=scandir($cache_dir);
		foreach ($images as $image){
			if(preg_match('/'.$id.'/', $image)){
				unlink($cache_dir.$image);
			}
		}
		*/
    }    
    
    
    
}



